package myfamily.model;

import java.util.*;

public class Occupation
{
	private String designation;
	private Date dateOfJoining;
	private String companyName;
	private Date dateOfLeaving;
	private Occupation alsoWorkedAt;
	
	public Occupation()
	{
		this.alsoWorkedAt = null;
	}

	public Occupation(String desig, String company, Date doj , Date dol )
	{
		this.setCompanyName(company);
		this.designation = desig;
		this.dateOfJoining = doj;
		this.dateOfLeaving = dol;
		this.alsoWorkedAt = null;
	}

	public void setDesignation(String designation) {
		this.designation = designation;
	}
	public String getDesignation() {
		return designation;
	}

	public void setDateOfJoining(Date dateOfJoining) {
		this.dateOfJoining = dateOfJoining;
	}

	public Date getDateOfJoining() {
		return dateOfJoining;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setDateOfLeaving(Date dateOfLeaving) {
		this.dateOfLeaving = dateOfLeaving;
	}

	public Date getDateOfLeaving() {
		return dateOfLeaving;
	}

	/**
	 * @param prevWorked the prevWorked to set
	 */
	public void setPrevWorked(Occupation prevWorked) {
		alsoWorkedAt = prevWorked;
	}

	/**
	 * @return the prevWorked
	 */
	public Occupation getPrevWorked() {
		return alsoWorkedAt;
	}
	
}